<?php if(!defined('HDPHP_PATH'))EXIT;
$db->exe("DROP TABLE IF EXISTS `".$db_prefix."blog`");
$db->exe("CREATE TABLE `".$db_prefix."blog`".$db_prefix." (
  `".$db_prefix."id`".$db_prefix." int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `".$db_prefix."title`".$db_prefix." char(100) DEFAULT NULL COMMENT '标题',
  `".$db_prefix."cid`".$db_prefix." smallint(6) DEFAULT NULL,
  `".$db_prefix."click`".$db_prefix." mediumint(9) DEFAULT NULL,
  PRIMARY KEY (`".$db_prefix."id`".$db_prefix.")
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8");
$db->exe("DROP TABLE IF EXISTS `".$db_prefix."blog2`");
$db->exe("CREATE TABLE `".$db_prefix."blog2`".$db_prefix." (
  `".$db_prefix."id`".$db_prefix." int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `".$db_prefix."title`".$db_prefix." char(100) DEFAULT NULL COMMENT '标题',
  `".$db_prefix."cid`".$db_prefix." smallint(6) DEFAULT NULL,
  `".$db_prefix."click`".$db_prefix." mediumint(9) DEFAULT NULL,
  PRIMARY KEY (`".$db_prefix."id`".$db_prefix.")
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8");
$db->exe("DROP TABLE IF EXISTS `".$db_prefix."category`");
$db->exe("CREATE TABLE `".$db_prefix."category`".$db_prefix." (
  `".$db_prefix."cid`".$db_prefix." smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  `".$db_prefix."catname`".$db_prefix." char(50) DEFAULT NULL,
  PRIMARY KEY (`".$db_prefix."cid`".$db_prefix.")
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8");
$db->exe("DROP TABLE IF EXISTS `".$db_prefix."category2`");
$db->exe("CREATE TABLE `".$db_prefix."category2`".$db_prefix." (
  `".$db_prefix."cid`".$db_prefix." smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  `".$db_prefix."catname`".$db_prefix." char(50) DEFAULT NULL,
  PRIMARY KEY (`".$db_prefix."cid`".$db_prefix.")
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8");
$db->exe("DROP TABLE IF EXISTS `".$db_prefix."news`");
$db->exe("CREATE TABLE `".$db_prefix."news`".$db_prefix." (
  `".$db_prefix."id`".$db_prefix." int(10) unsigned NOT NULL AUTO_INCREMENT,
  `".$db_prefix."title`".$db_prefix." varchar(255) DEFAULT NULL,
  `".$db_prefix."user_id`".$db_prefix." int(11) DEFAULT NULL,
  `".$db_prefix."addtime`".$db_prefix." int(11) DEFAULT NULL,
  PRIMARY KEY (`".$db_prefix."id`".$db_prefix.")
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8");
$db->exe("DROP TABLE IF EXISTS `".$db_prefix."news_data`");
$db->exe("CREATE TABLE `".$db_prefix."news_data`".$db_prefix." (
  `".$db_prefix."id`".$db_prefix." int(10) unsigned NOT NULL AUTO_INCREMENT,
  `".$db_prefix."content`".$db_prefix." text,
  `".$db_prefix."nid`".$db_prefix." int(11) DEFAULT NULL,
  PRIMARY KEY (`".$db_prefix."id`".$db_prefix.")
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8");
$db->exe("DROP TABLE IF EXISTS `".$db_prefix."user`");
$db->exe("CREATE TABLE `".$db_prefix."user`".$db_prefix." (
  `".$db_prefix."uid`".$db_prefix." int(10) unsigned NOT NULL AUTO_INCREMENT,
  `".$db_prefix."username`".$db_prefix." char(50) DEFAULT NULL,
  `".$db_prefix."password`".$db_prefix." char(40) DEFAULT NULL,
  PRIMARY KEY (`".$db_prefix."uid`".$db_prefix.")
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8");
$db->exe("DROP TABLE IF EXISTS `".$db_prefix."user_info`");
$db->exe("CREATE TABLE `".$db_prefix."user_info`".$db_prefix." (
  `".$db_prefix."id`".$db_prefix." int(10) unsigned NOT NULL AUTO_INCREMENT,
  `".$db_prefix."email`".$db_prefix." char(50) DEFAULT NULL,
  `".$db_prefix."address`".$db_prefix." varchar(255) DEFAULT NULL,
  `".$db_prefix."qq`".$db_prefix." char(20) DEFAULT NULL,
  `".$db_prefix."user_id`".$db_prefix." int(11) DEFAULT NULL,
  PRIMARY KEY (`".$db_prefix."id`".$db_prefix.")
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8");
